package com.cby.android.sample.repository.api

import com.cby.android.sample.bean.wan.*
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

/**
 * @description: WanAndroidApiService
 * @author: ChenBaoYang
 * @createDate: 2022/4/29 2:00 下午
 */
interface WanAndroidApiService {

    @GET("/banner/json")
    suspend fun getBanners() : WanApiResponse<List<WanBannerBean>>

    @GET("/article/list/{page}/json")
    suspend fun getArticles(@Path("page") page:Int) : WanApiResponse<WanApiPageResponse<WanArticleBean>>

    @GET("/friend/json")
    suspend fun getFriendSites() : WanApiResponse<List<WanFriendSiteBean>>

    @GET("/hotkey/json")
    suspend fun getHotKey() : WanApiResponse<List<WanHotKeyBean>>

    @GET("/article/top/json")
    suspend fun getTopArticles() : WanApiResponse<List<WanArticleBean>>


    @GET("/project/tree/json")
    suspend fun getProjectClassify(): WanApiResponse<List<WanClassifyBean>>

    @GET("/project/list/{page}/json")
    suspend fun getProjectList(
        @Path("page") page: Int,
        @Query("cid") cid: Int
    ): WanApiResponse<WanApiPageResponse<WanArticleBean>>
}